package com.example.model;

import java.io.Serializable;

/**
 * 接口返回数据模型
 *
 * @author 文希
 * @create 2019-07-08 16:28
 **/
public class ApiResult implements Serializable {
    private Integer code;

    private String message;

    private Object data;

    public ApiResult(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public ApiResult() {
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message == null ? null : message.trim();
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ApiResult{" + "code=" + code + ", message='" + message + '\'' + ", data=" + data + '}';
    }
}
